var local="http://47.104.10.151";


var User_id1;
var User_id2;
var User_id3;
var User_id4;
var User_id5;
var User_id6;
var seller_id1;
var seller_id2;
var seller_id3;
var seller_id4;
var seller_id5;
var seller_id6;
var address1;
var address2;
var address3;
var address4;
var address5;
var address6;


function payConfrim1() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/stockorder/mannagerConfirmMoney";
    var txt;//用于存储拼接字符串；
    txt="order_id="+order_id1;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
    alert("确认收款");

    xmlHttp.onreadystatechange=function()
    {
        if (xmlHttp.readyState==4 && xmlHttp.status==200)
        {
            var result=xmlHttp.responseText;
            var json=eval("("+result+")");
            User_id1=json.data.buyer_Id;
            seller_id1=json.data.seller_Id;
            address1=json.data.address;
            sendmsgConfirmMoney1();
            sendmsgToSeller1();
            var msg=json.msg;
        }
    };

}

function payConfrim2() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=lcoal+":8080/stockorder/mannagerConfirmMoney";
    var txt;//用于存储拼接字符串；
    txt="order_id="+order_id2;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
    alert("确认收款");
    xmlHttp.onreadystatechange=function()
    {
        if (xmlHttp.readyState==4 && xmlHttp.status==200)
        {
            var result=xmlHttp.responseText;
            var json=eval("("+result+")");
            User_id2=json.data.buyer_Id;
            seller_id2=json.data.seller_Id;
            address2=json.data.address;
            sendmsgConfirmMoney2();
            sendmsgToSeller2();
            var msg=json.msg;

        }
    };

}

function payConfrim3() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/stockorder/mannagerConfirmMoney";
    var txt;//用于存储拼接字符串；
    txt="order_id="+order_id3;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
    alert("确认收款");
    xmlHttp.onreadystatechange=function()
    {
        if (xmlHttp.readyState==4 && xmlHttp.status==200)
        {
            var result=xmlHttp.responseText;
            var json=eval("("+result+")");
            User_id3=json.data.buyer_Id;
            seller_id3=json.data.seller_Id;
            address3=json.data.address;
            sendmsgConfirmMoney3();
            sendmsgToSeller3();
            var msg=json.msg;

        }
    };

}

function payConfrim4() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/stockorder/mannagerConfirmMoney";
    var txt;//用于存储拼接字符串；
    txt="order_id="+order_id4;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
    alert("确认收款");
    xmlHttp.onreadystatechange=function()
    {
        if (xmlHttp.readyState==4 && xmlHttp.status==200)
        {
            var result=xmlHttp.responseText;
            var json=eval("("+result+")");
            User_id4=json.data.buyer_Id;
            seller_id4=json.data.seller_Id;
            address4=json.data.address;
            sendmsgConfirmMoney4();
            sendmsgToSeller4();
            var msg=json.msg;
        }
    };

}

function payConfrim5() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/stockorder/mannagerConfirmMoney";
    var txt;//用于存储拼接字符串；
    txt="order_id="+order_id5;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
    alert("确认收款");
    xmlHttp.onreadystatechange=function()
    {
        if (xmlHttp.readyState==4 && xmlHttp.status==200)
        {
            var result=xmlHttp.responseText;
            var json=eval("("+result+")");
            User_id5=json.data.buyer_Id;
            seller_id5=json.data.seller_Id;
            address5=json.data.address;
            sendmsgConfirmMoney5();
            sendmsgToSeller5();
            var msg=json.msg;
        }
    };

}

function payConfrim6() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/stockorder/mannagerConfirmMoney";
    var txt;//用于存储拼接字符串；
    txt="order_id="+order_id6;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
    alert("确认收款");
    xmlHttp.onreadystatechange=function()
    {
        if (xmlHttp.readyState==4 && xmlHttp.status==200)
        {
            var result=xmlHttp.responseText;
            var json=eval("("+result+")");
            User_id6=json.data.buyer_Id;
            seller_id6=json.data.seller_Id;
            address6=json.data.address;
            sendmsgConfirmMoney6();
            sendmsgToSeller6();
            var msg=json.msg;
        }
    };

}

function creatxmlHTTP() {
    if(window.XMLHttpRequest){
//  IE7+, Firefox, Chrome, Opera, Safari 浏览器执行代码
        xmlHttp=new XMLHttpRequest();
    }else {
        // IE6, IE5 浏览器执行代码
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    return xmlHttp;
}


function sendmsgConfirmMoney1() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    txt="user_id="+User_id1+"&message="+"平台确认收款请及时查看物流信息";
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);

}
function sendmsgConfirmMoney2() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    txt="user_id="+User_id2+"&message="+"平台确认收款请及时查看物流信息";
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgConfirmMoney3() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    txt="user_id="+User_id3+"&message="+"平台确认收款请及时查看物流信息";
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgConfirmMoney4() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    txt="user_id="+User_id4+"&message="+"平台确认收款请及时查看物流信息";
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgConfirmMoney5() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    txt="user_id="+User_id5+"&message="+"平台确认收款请及时查看物流信息";
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgConfirmMoney6() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    txt="user_id="+User_id6+"&message="+"平台确认收款请及时查看物流信息";
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}



function sendmsgToSeller1() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    var address="买家地址为"+address1+"请及时发货";
    txt="user_id="+seller_id1+"&message="+address;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgToSeller2() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    var address="买家地址为"+address2+"请及时发货";
    txt="user_id="+seller_id2+"&message="+address;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgToSeller3() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    var address="买家地址为"+address3+"请及时发货";
    txt="user_id="+seller_id3+"&message="+address;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgToSeller4() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    var address="买家地址为"+address4+"请及时发货";
    txt="user_id="+seller_id4+"&message="+address;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgToSeller5() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    var address="买家地址为"+address5+"请及时发货";
    txt="user_id="+seller_id5+"&message="+address;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}
function sendmsgToSeller6() {
    var xmlHttp;
    xmlHttp=creatxmlHTTP();
    var url=local+":8080/messageController/saveMessage";
    var txt;//用于存储拼接字符串；
    var address="买家地址为"+address6+"请及时发货";
    txt="user_id="+seller_id6+"&message="+address;
    xmlHttp.open("POST",url,true);
    xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
    xmlHttp.send(txt);
}




